<?php

// Api Download:
// http://www.kigkonsult.se/iCalcreator/




 //echo "hello world";
 
 require_once( '[com_path2]/iCalcreator.class.php' ); 
 $v = new vcalendar(); 
 // create a new calendar instance 
 $v->setConfig( 'unique_id', 'icaldomain.com' ); 
 // set Your unique id 
 $v->setProperty( 'method', 'PUBLISH' ); 
 // required of some calendar software 
 $v->setProperty( "x-wr-calname", "Calendar Sample" ); 
 // required of some calendar software 
 $v->setProperty( "X-WR-CALDESC", "Calendar Description" ); 
 // required of some calendar software 
 $v->setProperty( "X-WR-TIMEZONE", "Europe/Stockholm" ); 
 // required of some calendar software .. . 
 $vevent = new vevent(); 
 // create an event calendar component 
 $vevent->setProperty( 'dtstart', array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>19, 'min'=>0, 'sec'=>0 )); 
 $vevent->setProperty( 'dtend', array( 'year'=>2007, 'month'=>4, 'day'=>1, 'hour'=>22, 'min'=>30, 'sec'=>0 )); 
 $vevent->setProperty( 'LOCATION', 'Central Placa' ); 
 // property name - case independent 
 $vevent->setProperty( 'summary', 'PHP summit' ); 
 $vevent->setProperty( 'description', 'This is a description' ); 
 $vevent->setProperty( 'comment', 'This is a comment' ); 
 $vevent->setProperty( 'attendee', 'attendee1@icaldomain.net' ); 
 $v->setComponent ( $vevent ); 
 // add event to calendar .. . 
 $vevent = new vevent(); $vevent->setProperty( 'dtstart', '20070401', array('VALUE' => 'DATE'));
 // alt. date format, now for an all-day event 
 $vevent->setProperty( "organizer" , 'boss@icaldomain.com' ); 
 $vevent->setProperty( 'summary', 'ALL-DAY event' ); 
 $vevent->setProperty( 'description', 'This is a description for an all-day event' ); 
 $vevent->setProperty( 'resources', 'COMPUTER PROJECTOR' ); 
 $vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));
 // weekly, four occasions 
 $vevent->parse( 'LOCATION:1CP Conference Room 4350' ); 
 // supporting parse of strict rfc2445 formatted text 
 $v->setComponent ( $vevent ); 
 // add event to calendar .. . .. .
 // all calendar components are described in rfc2445 .. .
 // a complete iCalcreator function list (ex. setProperty) in iCalcreator manual .. . 
 $v->returnCalendar();
 

?>
  
  
